<?php
include('header.php');


if (isset($_SESSION['logged'])):
	{
		// include("intro.php"); ?>
<div id="sidenav">
<?php	include('sidenav.php');  ?>
</div>

  <div style="text-align:center;margin:80px 0 0;">

<?php
$user = get_user();
if($user !== NULL){ ?>
	<br/><h3>Aloha!</h3>
	<p><strong>System:</strong> I have successfully identified you as a proper human creature. I find you a cool person, hence I've granted you some priviledges. To manipulate users start from the <a href="manage.php">Manage Users</a> page. Just don't tempt to mess with me for I will then spit a lot of errors on your face, and I can certainly assure you won't be able to handle them. <strong>Good Luck!</strong></p>
	<?php } else { ?>
	<br/><h3>Alboochi</h3>
	<p>Some information about the application.</p>
<?php } ?>
  
</div>
<?php	
}
else:
	{
		$home = "current_page_item";
/*include('nav.php');*/
?>


  <div id="newuser" class="main">
    <h3>What do you want to do?</h3>
    <ul id="buttons">
      <li><a href="register.php">I am looking for an <br />
        Alboochi <strong>account</strong></a></li>
      <li><a href="login.php">I already have an <br />

        Alboochi <strong>account</strong></a></li>
    </ul>
    <ul id="stats">
    <?php
    $total_contacts = "select count(*) from students";
    $result = mysql_query($total_contacts);
    $array = mysql_fetch_array($result);
    //the long way of counting # of items in a database table
    ?>
      <li>
        <p><img src="images/information.png" /> There is a total of <strong><?php echo $array[0]; ?></strong> registered students.</p>
<?php xmysql_close(); ?> 
      </li>
      <!--<li>
        <p><strong>695</strong> invitations have been shared. <img src="images/heart.png" /></p>
      </li>-->
    </ul>
  </div>
  <?php
	}
endif;
include('footer.php'); ?>